package com.car.service.impl;

import com.car.mapper.SysPostMapper;
import com.car.pojo.Post;
import com.car.service.SysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysPostServiceImpl implements SysPostService {
    @Autowired
    private SysPostMapper sysPostMapper;
    @Override
    public List<Post> list(Post post, Integer startIndex, Integer pageSize) {
        return sysPostMapper.list(post, startIndex, pageSize);
    }

    @Override
    public Integer selectSysUserCount(Post post) {
        return sysPostMapper.selectSysUserCount(post);
    }

    @Override
    public Integer add(Post post) {
        return sysPostMapper.add(post);
    }

    @Override
    public int delete(Integer post_id) {
        return sysPostMapper.delete(post_id);
    }

    @Override
    public int update(Post post) {
        return sysPostMapper.update(post);
    }

    @Override
    public Post getByid(Integer post_id) {
        return sysPostMapper.getByid(post_id);
    }

    @Override
    public List<Post> selectPostsByPostName(String post_name) {
        return sysPostMapper.selectPostsByPostName(post_name);
    }
}
